<template>
    <div>
        <el-button type="primary" @click="OnSyncDept()" round>同步部门</el-button>
        <el-button type="primary" @click="OnSyncUser()" round>同步用户</el-button>
    </div>
</template>

<script>
import axios from 'axios';

export default {
    name: 'Setting',
    methods: {
        OnSyncDept() {
            const _this = this;
            axios.get('http://localhost:8001/dept/syncDept').then(function(resp) {
                if (resp.data.code == 0) {
                    const h = _this.$createElement;
                    _this.$notify({
                        title: '提醒',
                        message: h('i', { style: 'color: teal' }, resp.data.result),
                    });
                }
            });
        },
        OnSyncUser() {},
    },
};
</script>

<style scoped></style>
